// ChimaeraSVN

// Copyright (C) 2008-2009 - ChimaeraSVN

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#pragma once
#pragma warning(push)
#include "svn_client.h"
#include "svn_pools.h"
#include "svn_config.h"
#pragma warning(pop)

class SVNPrompt
{
public:
	SVNPrompt();
	virtual ~SVNPrompt();

public:
	
	void Init(apr_pool_t *pool, svn_client_ctx_t* ctx);

	

private:

	static svn_error_t* userprompt(svn_auth_cred_username_t **cred, void *baton, const char *realm, svn_boolean_t may_save, apr_pool_t *pool);
	static svn_error_t* simpleprompt(svn_auth_cred_simple_t **cred, void *baton, const char *realm, const char *username, svn_boolean_t may_save, apr_pool_t *pool);

private:
	svn_auth_baton_t *			auth_baton;

};
